"""
Main blueprint for the Flask Blueprints demo.
"""
from flask import Blueprint, render_template, current_app

# Create the blueprint
main = Blueprint('main', __name__)


@main.route('/')
def index():
    """Home page."""
    return render_template('index.html')


@main.route('/about')
def about():
    """About page for the main blueprint."""
    return render_template('about.html')


@main.errorhandler(404)
def not_found(error):
    """Handle 404 errors within the main blueprint."""
    return render_template('base.html'), 404